package stripsPlanner;

public class MyTimeClass {
	
	private static MyTimeClass Singleton;
	// Note that the constructor is private
	private MyTimeClass() {}
	
	private long CountUnknowns = 0;
	private long CreateCheckList = 0;
	private long UnifyVariables = 0;
	private long BuildLinearization = 0;
	private long IsAlwaysAfter = 0;
	private long IsOnceAfter = 0;
	public static MyTimeClass getInstance() {
		
		if (Singleton == null) {
			Singleton = new MyTimeClass();
		}
		return Singleton;
	}

	public void addCountUnknowns(long t) {CountUnknowns += t;}
	public void addCreateCheckList(long t) {CreateCheckList += t;}
	public void addUnifyVariables(long t) {UnifyVariables += t;}
	public void addBuildLinearization(long t){BuildLinearization += t;}
	public void addIsAlwaysAfter(long t) {IsAlwaysAfter += t;}
	public void addIsOnceAfter(long t){IsOnceAfter += t;}
	
	public String toString()
	{
		String s = "";
		s += "CountUnknowns: " + CountUnknowns + "\n";
		s += "CreateCheckList: " + CreateCheckList + "\n";
		s += "UnifyVariables: " + UnifyVariables + "\n";
		s += "BuildLinearization: " + BuildLinearization +"\n";
		s += "IsAlwaysAfter: " + IsAlwaysAfter + "\n";
		s += "IsOnceAfter: " + IsOnceAfter +"\n";
		return s;
	}
}
